#ifndef MODELLISTENER_HPP
#define MODELLISTENER_HPP

#include <gui/model/Model.hpp>
extern "C" {
#include "stdint.h"
}
class ModelListener
{
public:
    ModelListener() : model(0) {}
    
    virtual ~ModelListener() {}

    void bind(Model* m)
    {
        model = m;
    }
		//更新日期和时间
		virtual void updateDate(uint8_t Year, uint8_t Month, uint8_t Date, uint8_t WeekDay) {}
		virtual void updateTime(uint8_t Hours, uint8_t Minutes, uint8_t Seconds) {}
		//页面跳转
		virtual void SettingPageChange(uint8_t newFiveKeyFunc){}
		virtual void DialPageChange(uint8_t newFiveKeyFunc){}
		virtual void AppPageChange(uint8_t newFiveKeyFunc){}
		virtual void SixAxisPageChange(uint8_t newFiveKeyFunc){}
		virtual void ChipPageChange(uint8_t newFiveKeyFunc){}
		virtual void MotorPageChange(uint8_t newFiveKeyFunc){}
		virtual void InfoPageChange(uint8_t newFiveKeyFunc){}
		virtual void HealthPageChange(uint8_t newFiveKeyFunc){}
		virtual void WiFiPageChange(uint8_t newFiveKeyFunc){}
		virtual void BatteryPageChange(uint8_t newFiveKeyFunc){}
		virtual void SportPageEnter(uint8_t newKeyFunc){}
		virtual void SportPageExit(uint8_t newFiveKeyFunc){}
		virtual void AlipayPageChange(uint8_t newFiveKeyFunc){}
		//温度/步数/心率上传
		virtual void updateTempStepHeart(float newTem, unsigned long newStep, uint32_t newHeartRate){}
		//更新姿态信息参数
		virtual void updateSixAxis(float pitchVal,float rollVal,float yawVal) {}
		//更新芯片内部参数
		virtual void updateChipInfor(uint16_t ChipTempVal, uint16_t VrefVal, uint16_t VbatVal) {}	
		//健康监测信息上传
		virtual void updateHeartRateInfo(uint32_t newHeartRate, uint32_t newSPO2) {}	
		//更新温湿度、光照度数据上传	
		virtual void updateInfo(float newHum, float newTem, uint16_t newALS) {}
		//获取WiFi模组的RSSI值
		virtual void updateWiFiRSSI(uint8_t (&pWiFiInfo)[40], uint16_t newRSSI) {}	
		virtual void updateWalkStep(unsigned long newStep){}
		//更新电压、电流
		virtual void updateBatteryPageInfo(uint16_t CurrentVal, uint16_t VoltageVal) {}
protected:
    Model* model;
};

#endif // MODELLISTENER_HPP
